package site.shihuan.helpdesk.service.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import site.shihuan.helpdesk.common.model.RestResult;
import site.shihuan.helpdesk.common.model.RestResultUtils;

/**
 * 聊天服务
 *
 * @author 周世焕
 * @Date 2021/4/12 16:25
 */
@FeignClient(name = "helpdesk-im")
public interface ImService {

    /**
     * 结束客服
     * @param visitorId
     * @return
     */
    @PostMapping("v1/im/service/finish")
    @Async
    public RestResult finishService(@RequestParam String visitorId);

    /**
     * 接入客服
     * @param tenantId
     * @param visitorId
     * @return
     */
    @PostMapping("v1/im/service/start")
    @Async
    public RestResult startService(@RequestParam String tenantId,@RequestParam String visitorId);
}
